﻿namespace Utility1
{
    using System;
    using System.Configuration;

    public static class Constant
    {
        public static int CurrentLanguage = 1;

        public static class Cache
        {
            public const double expireInMinutes = 1440.0;
        }

        public static class Calculation
        {
            public const int percision = 2;
        }

        public static class Configuration
        {
            public const string config_logo = "config_logo";
            public const string description = "config_description";
            public const string email = "config_email";
            public const string fax = "config_fax";
            public const string metakeywords = "config_metakeywords";
            public const string phone = "config_phone";
            public const string sitename = "config_sitename";
            public const string skypeid = "config_skypeid";
            public const string yahooid = "config_yahooid";
        }

        public static class DB
        {
            public const string AnonymousUsername = "Anonymous";
            public const string CategoryPathSeparator = ":";
            public static readonly DateTime DBDateTimeMaxValue = new DateTime(0x81f, 6, 5);
            public static readonly DateTime DBDateTimeMinValue = new DateTime(0x76c, 1, 1);
            public const char FieldSeparator = ';';
            public const char ListSeparator = ',';
            public const int MaxPriceRangeValue = 0x7fffffff;
            public const string NullString = "NULL";
            public const string Position_Banner = "1";
            public const string Position_Left = "2";
            public const string Position_Right = "3";
            public const string Position_Slide = "4";
        }

        public static class DSC
        {
            public static readonly string AdvUploadFolder = ConfigurationManager.AppSettings["AdvImageFolder"];
            public static readonly int Id_Xml_AdvPostion = DBConvert.ParseInt(ConfigurationManager.AppSettings["Id_Xml_AdvPostion"]);
            public static readonly int Id_Xml_BannerPostion = DBConvert.ParseInt(ConfigurationManager.AppSettings["Id_Xml_BannerPostion"]);
            public static readonly int Id_Xml_PageAdmin = DBConvert.ParseInt(ConfigurationManager.AppSettings["Id_Xml_PageAdmin"]);
            public static readonly int Id_Xml_PagePublish = DBConvert.ParseInt(ConfigurationManager.AppSettings["Id_Xml_PagePublish"]);
            public static readonly int IDContentBuyersGuide = DBConvert.ParseInt(ConfigurationManager.AppSettings["IDContentBuyersGuide"]);
            public static readonly int IDContentIntro = DBConvert.ParseInt(ConfigurationManager.AppSettings["IDContentIntro"]);
            public static readonly int IDContentService = DBConvert.ParseInt(ConfigurationManager.AppSettings["IDContentService"]);
            public static readonly int IDContentWarrantyPolicy = DBConvert.ParseInt(ConfigurationManager.AppSettings["IDContentWarrantyPolicy"]);
            public static readonly int IDRootProductCategory = DBConvert.ParseInt(ConfigurationManager.AppSettings["IDRootProductCategory"]);
            public static readonly string NewsUploadFolder = ConfigurationManager.AppSettings["NewsImageFolder"];
            public static readonly int PageSize = DBConvert.ParseInt(ConfigurationManager.AppSettings["PageSize"]);
            public static readonly int Session_Timeout = DBConvert.ParseInt(ConfigurationManager.AppSettings["Session_Timeout"]);
        }

        public static class RegularExpressionString
        {
            public const string validateEmail = @"^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$";
            public const string validateNumber = @"^[-]?\d*\.?\d*$";
            public const string validatePhone = @"((\(\d{3,4}\)|\d{3,4}-)\d{4,9}(-\d{1,5}|\d{0}))|(\d{4,12})";
        }

        public static class Security
        {
            public const string SymmetricInstance = "RijndaelManaged";
        }

        public static class UI
        {
            public const string admin_msg_save_fail = "Information save unsuccessful";
            public const string admin_msg_save_success = "Information is saved successfully";
            public const string email_send_fail = "Must enter valid User ID and answer, please try again";
            public const string email_send_success = "Password reset successful, Please check your email to login";
            public const string menu_home = "Main page";
            public const string start_msg_save_fail = "We were unable to verify your account information.  Please confirm your billing information and retry or contact our Customer Service Department at 1-800-…  We look forward to assisting you with your Dream Management System";
            public const string start_msg_save_success = "Congratulations! You have successfully completed your account set-up.   Thank you for your business!!";
        }
    }
}

